﻿using JXC.Core.Models;
using JXC.Core.Repository;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JXC.EFCore.Repository
{
    public class ReService : IReService
    {
        private readonly AppDbContext _context;
        public ReService(AppDbContext context)
        {
            _context = context;
        }
        public async Task<List<PlanDetail>> GetPlanDetailsAndGoods(Guid PlanId)
        {

            var res = await _context.PlanDetail.Include(p => p.CommodityInformationSheet).Where(p => p.CaigouPlanId == PlanId).ToListAsync();
            return res;
        }
    }
}
